package uy.com.csi.gestpro.model.mantenimiento;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the gp_grpo_eqpmnto database table.
 * 
 */
@Entity
@Table(name="gp_grpo_eqpmnto", schema="mantenimiento")
@NamedQuery(name="GpGrpoEqpmnto.findAll", query="SELECT g FROM GpGrpoEqpmnto g")
public class GpGrpoEqpmnto implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private Integer id;

	@Column(name="id_prycto")
	private Integer idPrycto;

	private String nmbre;

	//bi-directional many-to-one association to GpEqpmnto
	@OneToMany(mappedBy="gpGrpoEqpmnto")
	private List<GpEqpmnto> gpEqpmntos;

	public GpGrpoEqpmnto() {
	}

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getIdPrycto() {
		return this.idPrycto;
	}

	public void setIdPrycto(Integer idPrycto) {
		this.idPrycto = idPrycto;
	}

	public String getNmbre() {
		return this.nmbre;
	}

	public void setNmbre(String nmbre) {
		this.nmbre = nmbre;
	}

	public List<GpEqpmnto> getGpEqpmntos() {
		return this.gpEqpmntos;
	}

	public void setGpEqpmntos(List<GpEqpmnto> gpEqpmntos) {
		this.gpEqpmntos = gpEqpmntos;
	}

	public GpEqpmnto addGpEqpmnto(GpEqpmnto gpEqpmnto) {
		getGpEqpmntos().add(gpEqpmnto);
		gpEqpmnto.setGpGrpoEqpmnto(this);

		return gpEqpmnto;
	}

	public GpEqpmnto removeGpEqpmnto(GpEqpmnto gpEqpmnto) {
		getGpEqpmntos().remove(gpEqpmnto);
		gpEqpmnto.setGpGrpoEqpmnto(null);

		return gpEqpmnto;
	}

}